package com.eazyshop.goods.controller;



import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import java.util.Map;

@Controller
@RequestMapping("/demo")
public class DemoController {


    @RequestMapping("/test")
    @ResponseBody
    public String test(){
        return "goods test";
    }

    @RequestMapping("/map")
    @ResponseBody
    public String testMap(Model model){

        Map<String, Object> map = model.asMap();

        for (Map.Entry<String, Object> entry : map.entrySet()) {

            System.out.println("::::::"+entry.getKey());

            System.out.println("||||"+entry.getValue());

        }
        return  "map";
    }
}
